package com.xh.bussiness.exam.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.xh.core.model.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 错题类型表
 * </p>
 *
 * @author JQM
 * @since 2019-11-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cp_user_error_category")
public class UserErrorCategory extends SuperEntity {

    private static final long serialVersionUID = 1L;

    private String name;

    /**
     * 错题类型：1错误来源 2 错误原因
     */
    private Integer type;

    /**
     * 排序
     */
    private Integer orderIndex;
    /**
     * 
     */
    @TableField(exist=false)
    private Integer isSystem=0;
    
    private String studentId;
    
    public UserErrorCategory() {
		super();
	}
    
	public UserErrorCategory(String id, String name, String code, Integer orderIndex, Integer isSystem) {
		super();
		super.setId(id);
		this.name = name;
		this.type = code.equals("QUESTION_SOURCE") ? 1 : 2;
		this.orderIndex = orderIndex;
		this.isSystem = isSystem;
	}

    
}
